package miracle.joker.lambda.test01;

public class Main {

    public static void main(String[] args) {
        NoParameterNoReturn n = ()->{};
        System.out.println();
        n.test2();
        //NoParameterNoReturn2 n2 = ()->{};
        System.out.println();
        HaveParameterNoReturn h = (String  a)->{
            System.out.println("sb"+a);
        };
        h.test1("nick");
        System.out.println();

        HaveParameterNoReturn2 h2 = (int a,int b)->{
            System.out.println(a*b);
        };
        h2.test2(666,999);
        System.out.println();

        HaveParameterHaveReturn r1 = (int a,int b)->{
            return a+b;
        };
        int test1 = r1.test(666, 999);
        System.out.println(test1);
        System.out.println();

        HaveParameterHaveReturn2 r2 = (String a)->{
            return "error:"+a;
        };
        String test = r2.test("404");
        System.out.println(test);
    }
}
